import request from '@/utils/request'

// 查询分班规则列表
export function clazzRuleList(query) {
  return request({
    url: '/system/clazz/rule/list',
    method: 'get',
    params: query
  })
}

// 新增分班规则
export function addClazzRule(data) {
  return request({
    url: '/system/clazz/rule',
    method: 'post',
    data: data
  })
}

// 修改分班规则
export function updateClazzRule(data) {
  return request({
    url: '/system/clazz/rule',
    method: 'put',
    data: data
  })
}

// 删除分班规则
export function delClazzRule(id) {
  return request({
    url: '/system/clazz/rule/' + id,
    method: 'delete'
  })
}

// 查询分班规则详细
export function getClazzRule(id) {
  return request({
    url: '/system/clazz/rule/' + id,
    method: 'get'
  })
}

// 执行分班规则
export function executeClazzRule(id) {
  return request({
    url: '/system/clazz/rule/execute/' + id,
    method: 'post',
  })
}